#ifndef IMAGE_H
#define IMAGE_H

#include "core/Object.h"
#include "types/Rect.h"
#include "types/Color.h"
#include <string>
#include <SDL/SDL.h>

namespace SolidityEngine{


class Image : public Object
{
    protected:
        SDL_Surface* _rendersurface;

    public:
        Image(int Width=10, int Height=10, const Color32& color=Color32());
        //Image(const Image& image);

        virtual ~Image();

        int Width() const;
        int Height() const;

        ///Use with EXTREME caution!!
        void* Pixels();

        SDL_Surface* GetSurface();
        const SDL_Surface* GetSurface() const;

        Rect GetClipRect() const;
        void SetClipRect(const Rect& rect);

    private:
        virtual Image* _Clone(){
            return new Image(*this);
        };

        virtual std::string _Serialize(){
            return std::string("Serialization not implemented for: ")+std::string(typeid(*this).name());
        };

};

}
#endif // IMAGE_H
